﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using entities;
using DataAccessLibrary.DAL;

namespace ServiceLibrary
{
    [ServiceContract]
    public interface IInternalService
    {
        #region CUSTOMER Management

        [OperationContract]
        List<Customer> CusReadAll();

        [OperationContract]
        string CusAdd(string pIdentityNumber, string pCustomerName, string pCustomerPhone, string pCustomerEmail,bool pCustomerSex);

        [OperationContract]
        string CusModify(string pIdentityNumber, string pCustomerName, string pCustomerPhone,
                       string pCustomerEmail, bool pCustomerSex);        

        [OperationContract]
        string UpdateUserPW(string pUN, string pPW);

        [OperationContract]
        List<Customer> FindCustomerByName(string pCustomerName);

        [OperationContract]
        Customer FindCustomerByAccount(string pCustomerAccount);

        [OperationContract]
        Customer FindCustomerByIdentityNumber(string pIdentityNumber);

        [OperationContract]
        Customer FindCustomerByEmail(string pEmail);

        [OperationContract]
        bool CusEmailCheck(string email);

        [OperationContract]
        bool CusIdCheck(string id);

        #endregion

        #region "SEARCH Room for Booking"

        [OperationContract]
        List<RoomType> SearchByPrice(int minPrice, int maxPrice);

        [OperationContract]
        List<RoomType> SearchByFeature(bool view, bool bath, bool balcony);

        [OperationContract]
        List<RoomType> SearchByAll(int minPrice, int maxPrice, bool view, bool bath, bool balcony);

        [OperationContract]
        List<vRoomInfo> getAvailableRoom(int roomTypeId, DateTime inDate, DateTime outDate);

        [OperationContract]
        List<int> getAvailableRoomID(int roomTypeId, DateTime inDate, DateTime outDate);

        #endregion

        #region "Booking Management"
        [OperationContract]
        string BookAdd(string pCustomerID, List<int> pRoomID, DateTime pCheckInDate, DateTime pCheckOutDate);
        #endregion

        #region "ROOM Management"
        [OperationContract]
        List<RoomType> RoTyGet();
        #endregion
    }
}